package cn.ren.controller;

import cn.ren.constant.MessageConstant;
import cn.ren.entity.PageResult;
import cn.ren.entity.QueryPageBean;
import cn.ren.entity.Result;
import cn.ren.pojo.CheckGroup;
import cn.ren.pojo.LZOrderShow;
import cn.ren.service.LZOrderShowService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/orderShow")
public class LZOrderShowController {
    @Reference
    LZOrderShowService lzOrderShowService;
    @RequestMapping("/findPage")
    public PageResult findPage(@RequestBody QueryPageBean queryPageBean){
        Integer currentPage = queryPageBean.getCurrentPage();
        Integer pageSize = queryPageBean.getPageSize();
        String queryString = queryPageBean.getQueryString();
        return lzOrderShowService.queryPage(currentPage,pageSize,queryString);
    }
    @RequestMapping("/add")
    public Result add(@RequestBody LZOrderShow lzOrderShow,int[] checkgroupIds){
            return  lzOrderShowService.add(lzOrderShow,checkgroupIds);
    }
}
